/* Copyright (C) Yassen 2010
*
* time.js
* Defines functions for getting the time.
*
* SetGMTOffset(time)
* Local()
* GMT()
*/

Lib.Time.GMTOffset = 0;

Lib.Time.SetGMTOffset = function(time)
{
  Lib.Time.GMTOffset = time - Lib.Time.Local();
  return Lib.Time.GMTOffset;
}

Lib.Time.Local = function()
{
  return Math.round(new Date().getTime() / 1000);
}

Lib.Time.GMT = function()
{
  return Lib.Time.Local + GMTOffset;
}